import java.util.ArrayList;
import java.util.List;

// 建筑物类
class Building {
    private String name;

    public Building(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}

// 课程类
class Course {
    private String name;
    private Building building;

    public Course(String name, Building building) {
        this.name = name;
        this.building = building;
    }

    public String getName() {
        return name;
    }

    public Building getBuilding() {
        return building;
    }
}

// 学院类
class College {
    private String name;
    private List<Building> buildings;
    private List<Course> courses;

    public College(String name) {
        this.name = name;
        this.buildings = new ArrayList<>();
        this.courses = new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    // 添加建筑物
    public void addBuilding(Building building) {
        buildings.add(building);
    }

    // 获取建筑物列表
    public List<Building> getBuildings() {
        return buildings;
    }

    // 添加课程
    public void addCourse(Course course) {
        courses.add(course);
    }

    // 获取课程列表
    public List<Course> getCourses() {
        return courses;
    }
}

public class Main {
    public static void main(String[] args) {
        // 创建建筑物
        Building building1 = new Building("Main Building");
        Building building2 = new Building("Science Building");

        // 创建学院
        College college = new College("My College");

        // 添加建筑物到学院
        college.addBuilding(building1);
        college.addBuilding(building2);

        // 创建课程
        Course course1 = new Course("Introduction to Programming", building1);
        Course course2 = new Course("Biology 101", building2);

        // 添加课程到学院
        college.addCourse(course1);
        college.addCourse(course2);

        // 打印信息
        System.out.println("College Name: " + college.getName());
        System.out.println("Buildings:");
        for (Building building : college.getBuildings()) {
            System.out.println("- " + building.getName());
        }
        System.out.println("Courses:");
        for (Course course : college.getCourses()) {
            System.out.println("- " + course.getName() + " (Building: " + course.getBuilding().getName() + ")");
        }
    }
}
